package com.chilly.db1.dao;

import com.chilly.bean.Account;
import org.apache.ibatis.annotations.Update;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

/**
 * Created by Chilly Cui on 2020/11/17.
 */
@Qualifier("db1SqlSessionTemplate")
public interface AccountDao {
    @Update("update account set money=money+#{money} where name=#{name} ")
    void addMoney(int money, String name);

    @Update("update account set money=money-#{money} where name=#{name} ")
    void reduceMoney(int money, String name);
}
